<%@ taglib uri="/WEB-INF/tlds/struts-tags.tld" prefix="s"%>
<%@taglib uri="/WEB-INF/tlds/c.tld" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<fieldset class="fieldsetMenu">
	<legend>
		<s:text name="Libelle.commun.ecrans.admin.message" />
	</legend>
	<div class="row-fluid">
		<div class="messagecssDiv">
			<s:if test="hasActionErrors()">
				<div class="errors">
					<div class="alert-error">
						<s:actionerror />
					</div>
				</div>
			</s:if>
			<s:label>
				<s:text name="Libelle.admin.message.form.textfield"></s:text>
			</s:label>
			<s:form cssClass="form-inline" method="post"
				action="ajouterMessageForm">
				<s:textfield name="msg" id="msg" />
				<s:submit value="Poster"></s:submit>
			</s:form>
			<br>
			<table class="tableCompteRendu">
				<thead>
					<tr>
						<th><s:text name="Libelle.admin.message.date.suppr"></s:text></th>
						<th><s:text name="Libelle.admin.message.date.tableau"></s:text></th>
						<th><s:text name="Libelle.admin.message.titre.tableau"></s:text></th>
						<th><s:text name="Libelle.admin.message.auteur.tableau"></s:text></th>


					</tr>
				</thead>
				<s:iterator value="#session.listeMessages" var="message">
					<tr>
						<td><a
							href='<s:url value="suppressionMessage?identifiantMessage=%{#message.identifiantMessage}" />'><img
								height="15" width="15"
								src="<s:url value='/media/images/croix15.png'/>"></a></td>
						<td><s:date name="#message.dateMessage" format="HH:mm:ss dd/MM/yyyy" /></td>
						<td><s:property value="#message.contenuMessage" /></td>
						<td><s:property
								value="#message.administrateurMessage.ldapPersonne" /></td>
					</tr>
				</s:iterator>
			</table>
		</div>
	</div>
</fieldset>